---
title: Delete schedule row
summary: Removes a hearing schedule row, permitted only while the row is in Cancelled status.
status: draft
owner: SAIF Documentation Pipeline
last_reviewed: 2026-08-21
library: SAIF.Application.Claim.Legal
reference_type: embedded
operation_id: OP-LGL-014
trigger: clsScheduleManager.DeleteSchedule() invoked
---

# Delete schedule row

This operation removes a hearing schedule row, but only while the row is in Cancelled status; otherwise the caller must cancel and save the event before deleting it.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-LGL-014 |
| **Trigger** | `clsScheduleManager.DeleteSchedule()` invoked |
| **Inputs** | Schedule row ID |
| **Outputs** | Row removed, or blocked with an error message |
| **Primary components** | `clsScheduleManager.DeleteSchedule` |
| **Entry point** | `SAIF.Application.Claim.Legal\LegalNet\clsScheduleManager.vb` |

## Steps

1. `DeleteSchedule()` is invoked for a target schedule row.
2. Evaluate the row's current status ([BR-LGL-017](../business-rules.md#br-lgl-017-a-schedule-row-can-only-be-deleted-while-cancelled)).
   - If the row is not in Cancelled status:
     - On failure: block the deletion with `"Error: Cancel the event and save, before deleting a schedule row"`.
3. If the row is in Cancelled status: delete the row.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([DeleteSchedule invoked]) --> Status{Row status = Cancelled?}
	Status -->|No| Blocked([Blocked: cancel and save first])
	Status -->|Yes| Delete[Delete schedule row]
	Delete --> EndOk([Done])
```

## Failure and edge-case behavior

- Row not in Cancelled status: deletion blocked with a user-facing error message directing the caller to cancel and save the event first.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- `SAIF.Application.Claim.Legal\LegalNet\clsScheduleManager.vb`
